package com.woniuxy.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import com.woniuxy.entity.GoodsFocus;
import com.woniuxy.entity.GoodsManagement;

@Mapper
public interface GoodsFocusMapper {

	//产品管理页查询全部	
	@Select("select * from t_goods_focus")
	public List<GoodsFocus> findGoodsFocus();
	
	
	//通过gfid查询当行数据
	@Select("select * from t_goods_focus where gfid = #{gfid}")
	public GoodsFocus findGoodsByGfid(int gfid);
	
	
	//通过gfid修改状态=1
	@Update("update t_goods_focus set status=1 where gfid=#{gfid}")
	public int modifyStatusByGfidOne(int gfid);
	
	
	//通过gfid修改状态=0
	@Update("update t_goods_focus set status=0 where gfid=#{gfid}")
	public int modifyStatusByGfidZero(int gfid);
	
	
	//通过gfid删除一条数据
	@Delete("delete from t_goods_focus where gfid=#{gfid}")
	public int deleteDataByGfid(int gfid);
	
	
	//selectStatusByOne
	//产品管理页查询全部	
	@Select("select * from t_goods_focus where status=#{status}")
	public List<GoodsFocus> selectStatusByOne(int status);
}
